<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

   


       <script src="./00.js"></script>
       <script>
             
           
            
            /*
            // const resData=pp.then((res)=>{
            //     console.log(res)
            //  },(error)=>{
            //    console.log(error)
            //  })
            //  console.log(resData)

            let pp=new Promise((reslove,reject)=>{
                     // reslove('pppppp')
                       reject('okkkkkkk')
                     //reject('errr')
                     // setTimeout(()=>{
                     //    reslove('okkkkkkk')
                     // })
             })


             pp.then((res)=>{
                console.log(res)
             },(error)=>{
               console.log(error)
             }).then((res)=>{
                console.log('kkkkkkkkkkkkk')
             },(error)=>{
               console.log(error)
             })
             */


               let p1 = new Promise((resolve, reject) => {
                  resolve('成功了')
               })

               let p2 = new Promise((resolve, reject) => {
                  resolve('success')
               })

               // let p3 = Promse.reject('失败')

               // Promise.all([p1, p2]).then((result) => {
               //      console.log(result)               //['成功了', 'success']
               // })

               Promise.race([p1, p2]).then((result) => {
                    console.log(result)               //['成功了', 'success']
               })

              

             



               











                   
       </script>



</body>
</html>